<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
	<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>帖子信息展示</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="/bzbs/replypost/res/layui/css/layui.css">
  <link rel="stylesheet" href="/bzbs/replypost/res/css/global.css">
</head>
<body>



<div class="fly-panel fly-column" style="padding-top: 5px;">
  <div class="layui-container">
    <!-- <ul class="layui-clear">
      <li class="layui-hide-xs"><a href="/">首页</a></li> 
      <li class="layui-this"><a href="">提问</a></li> 
      <li><a href="">讨论</a></li> 
      <li><a href="">建议</a></li> 
      <li><a href="">公告</a></li> 
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li> 
      
      用户登入后显示
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html">我发表的贴</a></li> 
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html#collection">我收藏的贴</a></li> 
    </ul>  -->
    
    <div class="fly-column-right layui-hide-xs"> 
      <a href="<%=path%>/replypost/add.jsp" class="layui-btn">发表新帖</a> 
    </div> 
  </div>
</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8">
      <div class="fly-panel" style="margin-bottom: 0;">
        
       <!--  <div class="fly-panel-title fly-filter">
          <a href="" class="layui-this">综合</a>
          <span class="fly-mid"></span>
          <a href="">未结</a>
          <span class="fly-mid"></span>
          <a href="">已结</a>
          <span class="fly-mid"></span>
          <a href="">精华</a>
          <span class="fly-filter-right layui-hide-xs">
            <a href="" class="layui-this">按最新</a>
            <span class="fly-mid"></span>
            <a href="">按热议</a>
          </span>
        </div> -->

        <ul class="fly-list">     
		<c:forEach items="${requestScope.page.data}" var="post">
			    
          <li>
            <!-- <a href="user/home.html" class="fly-avatar">
              <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" alt="贤心">
            </a> -->
            <h2>
              <a class="layui-badge">${post.type}</a>
              <a href="../post/queryDetail.do?postId=${post.postId}">${post.title}</a>
            </h2>
            <div class="fly-list-info">
              <a href="user/home.html" link>
                <cite>${post.student.stuName}</cite>
                <!--
                <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                <i class="layui-badge fly-badge-vip">VIP3</i>
                -->
              </a>
              <span>${post.createTime}</span>
              
              <span class="fly-list-kiss layui-hide-xs" title="喜欢"><i class="iconfont" title="人气">&#xe60b;</i> ${post.view}</span>
              <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
              <span class="fly-list-nums"> 
                <i class="iconfont icon-pinglun1" title="回答"></i> ${post.replyNum}
              </span>
            </div>
            <div class="fly-list-badge">
            <!--   <span class="layui-badge layui-bg-black">置顶</span> -->
              <!--<span class="layui-badge layui-bg-red">精帖</span>-->
            </div>
          </li>
          </c:forEach>
        </ul>
        
        <!-- <div class="fly-none">没有相关数据</div> -->
    
        <div style="text-align: center">
          <div class="laypage-main">
          
			
          		<a href="../post/query.do?pageNum=1" class="laypage-last" title="首页">首页</a>
          		<a href="../post/query.do?pageNum=${page.pageNum - 1}"<c:if test="${page.pageNum<=1}">onclick="javascript:return false;"</c:if> class="laypage-next">上一页</a>
                
                <a href="../post/query.do?pageNum=${page.pageNum - 0 +1}"<c:if test="${page.pageNum>= page.pages}">onclick="javascript:return false;"</c:if> class="laypage-next">下一页</a>
          		<a href="../post/query.do?pageNum=${page.pages}" class="laypage-last" title="尾页">尾页</a>
          		<span  class="laypage-last"  style="background-color:#5FB878">${page.pageNum}/${page.pages} </span>
          		
          </div>
        </div>

      </div>
    </div>
    <div class="layui-col-md4">
      <dl class="fly-panel fly-list-one">
        <dt class="fly-panel-title" style="color:red">本周热议</dt>
      	<c:forEach items="${requestScope.hotPostList}" var="hotPost">
      	
        <dd>
          <a href="../post/queryDetail.do?postId=${hotPost.postId}" class="fly-link">${hotPost.title}</a>
          <span><i class="iconfont icon-pinglun1"></i> ${hotPost.replyNum}</span>
        </dd>
        </c:forEach>
        
		<c:if test="${requestScope.hotPostList}==null">       
			 <div class="fly-none">没有相关数据</div>
		</c:if>
      </dl>

      <div class="fly-panel">
        <div class="fly-panel-title">
          这里可作为广告区域
        </div>
        <div class="fly-panel-main">
          <a href="" target="_blank" class="fly-zanzhu" style="background-color: #393D49;">虚席以待</a>
        </div>
      </div>
      
      <div class="fly-panel fly-link">
        <h3 class="fly-panel-title" >友情链接</h3>
        <dl class="fly-panel-main">
          <dd><a href="http://www.baidu.com/" class="fly-link"  target="_blank">百度</a><dd>
      <!-- 	class="fly-link" -->
        </dl>
      </div>

    </div>
  </div>
</div>


<script src="/bzbs/replypost/res/layui/layui.js"></script>
<script>
layui.cache.page = 'jie';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '../../res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

</body>
</html>